package cc.rboot.inject.template;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import cc.rboot.inject.core.AbstractMapperInjector;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(path = "/_inject")
public class InjectQueryAll<T> extends AbstractMapperInjector<T> {

    /**
     * 默认的查询所有资源接口：带分页
     */
    @GetMapping(path = "/collect/all")
    public IPage<T> _execute(Page<T> page) throws Exception {
        return super.getService().page(page);
    }
}
